
export const chooseImage = () => {
    return new Promise(resolve => {
        let input = $('<input type="file" accept="image/*" />')
        $(input).click();
        $(input).change(e => {
            let file = e.target.files[0]
            let reader = new FileReader()
            reader.readAsDataURL(file);
            reader.onload = function () {
                $(input).remove();
                resolve(this.result);
            };
        });
    });
};
